Modification of post-viewing parameters for digital images using image region or feature information

ABSTRACT

A method of generating one or more new digital images using an original digitally-acquired image including a selected image feature includes identifying within a digital image acquisition device one or more groups of pixels that correspond to the selected image feature based on information from one or more preview images. A portion of the original image is selected that includes the one or more groups of pixels. The technique includes automatically generating values of pixels of one or more new images based on the selected portion in a manner which includes the selected image feature within the one or more new images.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. provisional patent applicationNo. 60/945,558, filed Jun. 21, 2007, entitled Digital Image Enhancementwith Reference Images.

This application is also a CIP of United States patent application no.PCT/US2006/021393, which is a CIP of U.S. patent application Ser. No.10/608,784, filed Jun. 26, 2003, which is one of a series ofcontemporaneously-filed patent applications including Atty docket2100874-991210 (FN102-A) entitled, “Digital Image Processing Using FaceDetection Information”, by inventors Eran Steinberg, Yuri Prilutsky,Peter Corcoran, and Petronel Bigioi; Atty docket 2100874-991220(FN102-B) entitled, “Perfecting of Digital Image Capture ParametersWithin Acquisition Devices Using Face Detection”, by inventors EranSteinberg, Yuri Prilutsky, Peter Corcoran, and Petronel Bigioi; Attydocket 2100874-991230 (FN102-C) entitled, “Perfecting the Optics Withina Digital Image Acquisition Device Using Face Detection”, by inventorsEran Steinberg, Yuri Prilutsky, Peter Corcoran, and Petronel Bigioi;Atty docket 2100874-991240 (FN102-D) entitled, “Perfecting the Effect ofFlash Within an Image Acquisition Device Using Face Detection”, byinventors Eran Steinberg, Yuri Prilutsky, Peter Corcoran, and PetronelBigioi; Atty docket 2100874-991250 (FN102-E) entitled, “A Method ofImproving Orientation and Color Balance of Digital Images Using FaceDetection Information”, by inventors Eran Steinberg, Yuri Prilutsky,Peter Corcoran, and Petronel Bigioi; Atty docket 2100874-991260(FN102-F) entitled, “Modification of Viewing Parameters for DigitalImages Using Face Detection Information”, by inventors Eran Steinberg,Yuri Prilutsky, Peter Corcoran, and Petronel Bigioi; Atty docket2100874-991270 (FN102-G) entitled, “Digital Image Processing CompositionUsing Face Detection Information”, by inventor Eran Steinberg; Attydocket 2100874-991280 (FN102-H) entitled, “Digital Image AdjustableCompression and Resolution Using Face Detection Information” byinventors Eran Steinberg, Yuri Prilutsky, Peter Corcoran, and PetronelBigioi; and Atty docket 2100874-991290 (FN102-I) entitled, “Perfectingof Digital Image Rendering Parameters Within Rendering Devices UsingFace Detection” by inventors Eran Steinberg, Yuri Prilutsky, PeterCorcoran, and Petronel Bigioi.

This application is related to U.S. patent application Ser. No.11/573,713, filed Feb. 14, 2007, which claims priority to U.S.provisional patent application No. 60/773,714, filed Feb. 14, 2006, andto PCT application no. PCT/EP2006/008229, filed Aug. 15, 2006 (FN-119).

This application also is related to Ser. No.11/024,046, filed Dec. 27,2004, which is a CIP of U.S. patent application Ser. No. 10/608,772,filed Jun. 26,2003 (fn-102e-cip)

This application also is related to PCT/US2006/021393, filed Jun. 2,2006, which is a CIP of Ser. No. 10/608,784, filed Jun. 26, 2003(fn-102f-cip-pct).

This application also is related to U.S. application Ser. No.10/985,657, filed Nov. 10, 2004 (FN-109A).

This application also is related to U.S. application Ser. No.11/462,035, filed Aug. 2, 2006, which is a CIP of U.S. application Ser.No. 11/282,954, filed Nov. 18, 2005 (FN-121-CIP).

This application also is related to Ser. No. 11/233,513, filed Sep. 21,2005, which is a CIP of U.S. application Ser. No. 11/182,718, filed Jul.15, 2005, which is a CIP of U.S. application Ser. No. 11/123,971, filedMay 6, 2005 and which is a CIP of U.S. application Ser. No. 10/976,366,filed Oct. 28, 2004 (FN-106-CIP-2).

This application also is related to U.S. patent application Ser. No.11/460,218, filed Jul. 26, 2006, which claims priority to U.S.provisional patent application Ser. No. 60/776,338, filed Feb. 24, 2006(FN-149a).

This application also is related to U.S. patent application Ser. No.12/063,089, filed Feb. 6, 2008, which is a CIP of U.S. Ser. No.11/766,674, filed Jun. 21, 2007, which is a CIP of U.S. Ser. No.11/753,397, which is a CIP of U.S. Ser. No. 11/765,212, filed Aug. 11,2006, now U.S. Pat. No. 7,315,631 (FN-143-CIP-3).

This application also is related to U.S. patent application Ser. No.11/674,650, filed Feb. 13, 2007, which claims priority to U.S.provisional patent application Ser. No. 60/773, 714, filed Feb. 14, 2006(FN-144).

This application is related to U.S. Ser. No. 11/836,744, filed Aug. 9,2007, which claims priority to U.S. provisional patent application Ser.No. 60/821,956, filed Aug. 9, 2006 (FN-178A).

This application is related to a family of applications filedcontemporaneously by the same inventors, including an applicationentitled DIGITAL IMAGE ENHANCEMENT WITH REFERENCE IMAGES (DocketFN-211A), and another entitled METHOD OF GATHERING VISUAL META DATAUSING A REFERENCE IMAGE (Docket: FN-211B), and another entitled IMAGECAPTURE DEVICE WITH CONPEMPORANEOUS REFERENCE IMAGE CAPTURE MECHANISM(Docket: FN-211C), and another entitled FOREGROUND/BACKGROUND SEPARATIONUSING REFERENCE IMAGES (Docket: FN-211D), and another entitled REAL-TIMEFACE TRACKING WITH REFERENCE IMAGES (Docket: FN-211F) and anotherentitled METHOD AND APPARATUS FOR RED-EYE DETECTION USING PREVIEW OROTHER REFERENCE IMAGES (Docket: FN-211G).

All of these priority and related applications, and all references citedbelow, are hereby incorporated by reference.

BACKGROUND 1. Field of the Invention

The invention relates to digital image processing and viewing,particularly automatic suggesting or processing of enhancements of adigital image using information gained from identifying and analyzingregions within an image or features appearing within the image,particularly for creating post acquisition slide shows. The inventionprovides automated image analysis and processing methods and tools forphotographs taken and/or images detected, acquired or captured indigital form or converted to digital form, or rendered from digital formto a soft or hard copy medium by using information about the regions orfeatures in the photographs and/or images.

2. Description of the Related art

This invention relates to finding and defining regions of interest (ROI)in an acquired image. In many cases the interest relates to items in theforeground of an image. In addition, and particularly for consumerphotography, the ROI relates to human subjects and in particular, faces.

Although well-known, the problem of face detection has not received agreat deal of attention from researchers. Most conventional techniquesconcentrate on face recognition, assuming that a region of an imagecontaining a single face has already been extracted and will be providedas an input. Such techniques are unable to detect faces against complexbackgrounds or when there are multiple occurrences in an image. For allof the image enhancement techniques introduced below and others as maybe described herein or understood by those skilled in the art, it isdesired to make use of the data obtained from face detection processesfor suggesting options for improving digital images or for automaticallyimproving or enhancing quality of digital images.

Yang et al., IEEE Transactions on Pattern Analysis and MachineIntelligence, Vol. 24, No. 1, pages 34-58, give a useful andcomprehensive review of face detection techniques January 2002. Theseauthors discuss various methods of face detection which may be dividedinto four main categories: (i) knowledge-based methods; (ii)feature-invariant approaches, including the identification of facialfeatures, texture and skin color; (iii) template matching methods, bothfixed and deformable and (iv) appearance based methods, includingeigenface techniques, statistical distribution based methods and neuralnetwork approaches. They also discuss a number of the main applicationsfor face detections technology. It is recognized in the presentinvention that none of this prior art describes or suggests usingdetection and knowledge of faces in images to create and/or use toolsfor the enhancement or correction of the images.

a. Faces as Subject Matter

Human faces may well be by far the most photographed subject matter forthe amateur and professional photographer. In addition, the human visualsystem is very sensitive to faces in terms of skin tone colors. Also, inexperiments performed by tracking the eye movement of the subjects, withan image that includes a human being, subjects tend to focus first andforemost on the face and in particular the eyes, and only later searchthe image around the figure. By default, when a picture includes a humanfigure and in particular a face, the face becomes the main object of theimage. Thus, many artists and art teachers emphasize the location of thehuman figure and the face in particular to be an important part of apleasing composition. For example, some teach to position faces aroundthe “Golden Ratio”, also known as the “divine proportion” in theRenaissance period, or PHI, φ-lines. Some famous artists whose workrepeatedly depict this composition are Leonardo Da-Vinci, Georges Seuratand Salvador Dali.

In addition, the faces themselves, not just the location of the faces inan image, have similar “divine proportion” characteristics. The headforms a golden rectangle with the eyes at its midpoint; the mouth andnose are each placed at golden sections of distance between the eyes andthe bottom on the chin etc. etc.

b. Color and Exposure of Faces

While the human visual system is tolerant to shifts in color balance,the human skin tone is one area where the tolerance is somewhat limitedand is accepted primarily only around the luminance axis, which is amain varying factor between skin tones of faces of people of differentraces or ethnic backgrounds. A knowledge of faces can provide animportant advantage in methods of suggesting or automatically correctingan overall color balance of an image, as well as providing pleasingimages after correction.

c. Auto Focus

Auto focusing is a popular feature among professional and amateurphotographers alike. There are various ways to determine a region offocus. Some cameras use a center-weighted approach, while others allowthe user to manually select the region. In most cases, it is theintention of the photographer to focus on the faces photographed,regardless of their location in the image. Other more sophisticatedtechniques include an attempt to guess the important regions of theimage by determining the exact location where the photographer's eye islooking. It is desired to provide advantageous auto focus techniqueswhich can focus on what is considered the important subject in the image

d. Fill-Flash

Another useful feature particularly for the amateur photographer isfill-flash mode. In this mode, objects close to the camera may receive aboost in their exposure using artificial light such as a flash, whilefar away objects which are not effected by the flash are exposed usingavailable light. It is desired to have an advantageous technique whichautomatically provides image enhancements or suggested options usingfill flash to add light to faces in the foreground which are in theshadow or shot with back light.

e. Orientation

The camera can be held horizontally or vertically when the picture istaken, creating what is referred to as a landscape mode or portraitmode, respectively. When viewing images, it is preferable to determineahead of time the orientation of the camera at acquisition, thuseliminating a step of rotating the image and automatically orienting theimage. The system may try to determine if the image was shothorizontally, which is also referred to as landscape format, where thewidth is larger than the height of an image, or vertically, alsoreferred to as portrait mode, where the height of the image is largerthan the width. Techniques may be used to determine an orientation of animage. Primarily these techniques include either recording the cameraorientation at an acquisition time using an in camera mechanicalindicator or attempting to analyze image content post-acquisition.In-camera methods, although providing precision, use additional hardwareand sometimes movable hardware components which can increase the priceof the camera and add a potential maintenance challenge. However,post-acquisition analysis may not generally provide sufficientprecision. Knowledge of location, size and orientation of faces in aphotograph, a computerized system can offer powerful automatic tools toenhance and correct such images or to provide options for enhancing andcorrecting images.

f. Color Correction

Automatic color correction can involve adding or removing a color castto or from an image. Such cast can be created for many reasons includingthe film or CCD being calibrated to one light source, such as daylight,while the lighting condition at the time of image detection may bedifferent, for example, cool-white fluorescent. In this example, animage can tend to have a greenish cast that it will be desired to beremoved. It is desired to have automatically generated or suggestedcolor correction techniques for use with digital image enhancementprocessing.

g. Cropping

Automatic cropping may be performed on an image to create a morepleasing composition of an image. It is desired to have automatic imageprocessing techniques for generating or suggesting more balanced imagecompositions using cropping.

h. Rendering

When an image is being rendered for printing or display, it undergoesoperation as color conversion, contrast enhancement, cropping and/orresizing to accommodate the physical characteristics of the renderingdevice. Such characteristic may be a limited color gamut, a restrictedaspect ratio, a restricted display orientation, fixed contrast ratio,etc. It is desired to have automatic image processing techniques forimproving the rendering of images.

i. Compression and resolution

An image can be locally compressed in accordance with a preferredembodiment herein, so that specific regions may have a higher qualitycompression which involves a lower compression rate. It is desired tohave an advantageous technique for determining and/or selecting regionsof importance that may be maintained with low compression or highresolution compared with regions determined and/or selected to have lessimportance in the image.

SUMMARY OF THE INVENTION

A method of generating one or more new digital images, or generating aprogression or sequence of related images in a form of a movie clip,using an original digitally-acquired image including a selected imagefeature is provided. The method includes identifying within a digitalimage acquisition device one or more groups of pixels that correspond toa selected image feature, or image region within an originaldigitally-acquired image based on information from one or more previewor other reference images. A portion of the original image is selectedthat includes the one or more groups of pixels segmented spatially or byvalue. Values of pixels of one or more new images are automaticallygenerated based on the selected portion in a manner which includes theselected image feature within the one or more new images.

The selected image feature may include a segmentation of the image totwo portions, e.g., a foreground region and a background region, and themethod may include visually separating the foreground region and thebackground region within the one or more new images. The visual encodingof such separation may be done gradually, thereby creating a movie-likeeffect.

The method may also include calculating a depth map of the backgroundregion. The foreground and background regions may be independentlyprocessed. One or more of the new images may include an independentlyprocessed background region or foreground region or both. Theindependent processing may include gradual or continuous change betweenan original state and a final state using one of or any combination ofthe following effects: focusing, saturating, pixilating, sharpening,zooming, panning, tilting, geometrically distorting, cropping, exposingor combinations thereof. The method may also include determining arelevance or importance, or both, of the foreground region or thebackground region, or both.

The method may also include identifying one or more groups of pixelsthat correspond to two or more selected image features within theoriginal digitally-acquired image. The automatic generating of pixelvalues may be in a manner which includes at least one of the two or moreselected image features within the one or more new images or a panningintermediate image between two of the selected image features, or acombination thereof.

The method may also include automatically providing an option forgenerating the values of pixels of one or more new images based on theselected portion in a manner which includes the selected image featurewithin each of the one or more new images.

A method of generating one or more new digital images using an originaldigitally-acquired image including separating background and foregroundregions is provided. The method includes identifying within a digitalimage acquisition device one or more groups of pixels that correspond toa background region or a foreground region, or both, within an originaldigitally-acquired image based on information from one or more previewor other reference images. The foreground portion may be based on theidentification of well known objects such as faces, human bodies,animals and in particular pets. Alternatively, the foreground portionmay be determined based on a pixel analysis with information such aschroma, overall exposure and local sharpness. Segmentations based onlocal analysis of the content or the values may be alternativelyperformed as understood by those skilled in the art of imagesegmentation. A portion of the original image is selected that includesthe one or more groups of pixels. Values of pixels of one or more newimages are automatically generated based on the selected portion in amanner which includes the background region or the foreground region, orboth. The method may also include calculating a depth map of thebackground region. The foreground and background regions may beindependently processed for generating new images.

The present invention and/or preferred or alternative embodimentsthereof can be advantageously combined with features of parent U.S.patent application Ser. No. 10/608,784, including a method of generatingone or more new digital images, as well as a continuous sequence ofimages, using an original digitally-acquired image including a face, andpreferably based on one or more preview or other reference images. Agroup of pixels that correspond to a face within the originaldigitally-acquired image is identified. A portion of the original imageis selected to include the group of pixels. Values of pixels of one ormore new images based on the selected portion are automaticallygenerated, or an option to generate them is provided, in a manner whichalways includes the face within the one or more new images.

A transformation may be gradually displayed between the originaldigitally-acquired image and one or more new images. Parameters of saidtransformation may be adjusted between the original digitally-acquiredimage and one or more new images. Parameters of the transformationbetween the original digitally-acquired image and one or more new imagesmay be selected from a set of at least one or more criteria includingtiming or blending or a combination thereof. The blending may varybetween the various segmented regions of an image, and can includedissolving, flying, swirling, appearing, flashing, or screening, orcombinations thereof.

Methods of generating slide shows that use an image including a face areprovided in accordance with the generation of one or more new images. Agroup of pixels is identified that correspond to a face within adigitally-acquired image based on information from one or more previewor other reference images. A zoom portion of the image including thegroup of pixels may be determined. The image may be automatically zoomedto generate a zoomed image including the face enlarged by the zooming,or an option to generate the zoomed image may be provided. A centerpoint of zooming in or out and an amount of zooming in or out may bedetermined after which another image may be automatically generatedincluding a zoomed version of the face, or an option to generate theimage including the zoomed version of the face may be provided. One ormore new images may be generated each including a new group of pixelscorresponding to the face, automatic panning may be provided using theone or more new images.

A method of generating one or more new digital images using an originaldigitally-acquired image including a face is further provided. One ormore groups of pixels may be identified that correspond to two or morefaces within the original digitally-acquired image based on informationfrom one or more preview or other reference images. A portion of theoriginal image may be selected to include the group of pixels. Values ofpixels may be automatically generated of one or more new images based onthe selected portion in a manner which always includes at least one ofthe two or more faces within the one or more new images or a panningintermediate image between two of the faces of said two or moreidentified faces or a combination thereof.

Panning may be performed between the two or more identified faces. Thepanning may be from a first face to a second face of the two or moreidentified faces, and the second face may then be zoomed. The first facemay be de-zoomed prior to panning to the second face. The second facemay also be zoomed. The panning may include identifying a panningdirection parameter between two of the identified faces. The panning mayinclude sequencing along the identified panning direction between thetwo identified faces according to the identified panning directionparameter.

A method of generating a simulated camera movement in a still imageusing an original digitally-acquired image including a face or otherimage feature is further provided. Simulated camera movements such aspanning, tilting and zooming may be determined based on the orientationof the face or multiple faces or other features in an image to simulatethe direction of the face and in particular the eyes. Such movement maythen simulate the direction the photographed subject is looking at. Suchmethod may be extended to two or more identified faces, or as indicatedother image features.

Each of the methods provided are preferably implemented within softwareand/or firmware either in the camera or with external processingequipment. The software may also be downloaded into the camera or imageprocessing equipment. In this sense, one or more processor readablestorage devices having processor readable code embodied thereon areprovided. The processor readable code programs one or more processors toperform any of the above or below described methods.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1a illustrates a preferred embodiment of the main workflow ofcorrecting images based on finding faces in the images.

FIG. 1b illustrates a generic workflow of utilizing face information inan image to adjust image acquisition parameters in accordance with apreferred embodiment.

FIG. 1c illustrates a generic workflow of utilizing face information ina single or a plurality of images to adjust the image renderingparameters prior to outputting the image in accordance with a preferredembodiment.

FIGS. 2a-2e illustrate image orientation based on orientation of facesin accordance with one or more preferred embodiments.

FIGS. 3a-3d illustrate an automatic composition and cropping of an imagebased on the location of the face in accordance with one or morepreferred embodiments.

FIGS. 4a-4g illustrate digital fill-flash in accordance with one or morepreferred embodiments.

FIG. 4h describes an illustrative system in accordance with a preferredembodiment to determine in the camera as part of the acquisitionprocess, whether fill flash is needed, and of so, activate such flashwhen acquiring the image based on the exposure on the face

FIG. 5 illustrates the use of face-detection for generating dynamicslide shows, by applying automated and suggested zooming and panningfunctionality where the decision as to the center of the zoom is basedon the detection of faces in the image.

FIG. 6 describes an illustrative simulation of a viewfinder in a videocamera or a digital camera with video capability, with an automaticzooming and tracking of a face as part of the live acquisition in avideo camera, in accordance with a preferred embodiment.

FIGS. 7a and 7b illustrate an automatic focusing capability in thecamera as part of the acquisition process based on the detection of aface in accordance with one or more preferred embodiments.

FIG. 8 illustrates an adjustable compression rate based on the locationof faces in the image in accordance with a preferred embodiment.

INCORPORATION BY REFERENCE

What follows is a cite list of references each of which is, in additionto that which is described as background, the invention summary, theabstract, the brief description of the drawings and the drawingsthemselves, hereby incorporated by reference into the detaileddescription of the preferred embodiments below, as disclosingalternative embodiments of elements or features of the preferredembodiments not otherwise set forth in detail below. A single one or acombination of two or more of these references may be consulted toobtain a variation of the preferred embodiments described in thedetailed description herein:

U.S. Pat. Nos. RE33682, RE31370, 4,047,187, 4,317,991, 4,367,027,4,638,364, 5,291,234, 5,432,863, 5,488,429, 5,638,136, 5,710,833,5,724,456, 5,751,836, 5,781,650, 5,812,193, 5,818,975, 5,835,616,5,870,138, 5,978,519, 5,991,456, 6,097,470, 6,101,271, 6,128,397,6,134,339, 6,148,092, 6,151,073, 6,188,777, 6,192,149, 6,249,315,6,263,113, 6,268,939, 6,278,491, 6,282,317, 6,301,370, 6,332,033,6,393,148, 6,404,900, 6,407,777, 6,421,468, 6,438,264, 6,456,732,6,459,436, 6,473,199, 6,501,857, 6,504,942, 6,504,951, 6,516,154, and6,526,161;

United States published patent applications no. 2005/0041121,2004/0114796, 2004/0240747, 2004/0184670, 2003/0071908, 2003/0052991,2003/0044070, 2003/0025812, 2002/0172419, 2002/0136450, 2002/0114535,2002/0105662, and 2001/0031142;

Published PCT applications no. WO 03/071484 and WO 02/045003

European patent application no EP 1 429 290 A;

Japanese patent application no. JP5260360A2;

British patent application no. GB0031423.7;

Yang et al., IEEE Transactions on Pattern Analysis and MachineIntelligence, Vol. 24, no. 1, pp 34-58 (Jan. 2002);

Baluja & Rowley , “Neural Network-Based Face Detection,” IEEETransactions on Pattern Analysis and Machine Intelligence, Vol. 20, No.1, pages 23-28, January 1998; and

Joffe, S. Ed, Institute of Electrical and Electronics Engineering, RedEye Detection with Machine Learning, Proceedings 2003 InternationalConference of Image Processing. ICIP-2003. Barcelona, Spain, Sep. 14-17,2003, New York, N.Y.: IEEE, US, vol. 2 or 3, 14 September 2003, pages871-874.

ILLUSTRATIVE DEFINITIONS

“Face Detection” involves the art of isolating and detecting faces in adigital image; Face Detection includes a process of determining whethera human face is present in an input image, and may include or ispreferably used in combination with determining a position and/or otherfeatures, properties, parameters or values of parameters of the facewithin the input image;

“Image-enhancement” or “image correction” involves the art of modifyinga digital image to improve its quality; such modifications may be“global” applied to the entire image, or “selective” when applieddifferently to different portions of the image. Some main categoriesnon-exhaustively include: (i) Contrast Normalization and ImageSharpening.

-   -   (ii) Image Crop, Zoom and Rotate.    -   (iii) Image Color Adjustment and Tone Scaling.    -   (iv) Exposure Adjustment and Digital Fill Flash applied to a        Digital Image.    -   (v) Brightness Adjustment with Color Space Matching; and        Auto-Gamma determination with Image Enhancement.    -   (vi) Input/Output device characterizations to determine        Automatic/Batch Image Enhancements.    -   (vii) In-Camera Image Enhancement    -   (viii) Face Based Image Enhancement

“Auto-focusing” involves the ability to automatically detect and bring aphotographed object into the focus field;

“Fill Flash” involves a method of combining available light, such as sunlight with another light source such as a camera flash unit in such amanner that the objects close to the camera, which may be in the shadow,will get additional exposure using the flash unit.

A “pixel” is a picture element or a basic unit of the composition of adigital image or any of the small discrete elements that togetherconstitute an image;

“Digitally-Captured Image” includes an image that is digitally locatedand held in a detector;

“Digitally-Acquired Image” includes an image that is digitally recordedin a permanent file and/or preserved in a more or less permanent digitalform; and

“Digitally-Detected Image”: an image comprising digitally detectedelectromagnetic waves.

“Digital Rendering Device”: A digital device that renders digitalencoded information such as pixels onto a different device. Most commonrendering techniques include the conversion of digital data into hardcopy such as printers, and in particular laser printers, ink jetprinters or thermal printers, or soft copy devices such as monitors,television, liquid crystal display, LEDs, OLED, etc.

‘Simulated camera movement” is defined as follows: given an image of acertain dimension (e.g. M×N) , a window which is a partial image iscreated out of the original image (of smaller dimension to the originalimage). By moving this window around the image, a simulated cameramovement is generated. The movement can be horizontal, also referred toas “panning”, vertical also referred to as “tilt”, or orthogonal to theimage plane also referred to as “zooming, or a combination thereof. Thesimulated camera movement may also include the gradual selection ofnon-rectangular window, e.g., in the shape of a trapezoid, or changingrectangular dimensions, which can simulate changes in the perspective tosimulate physical movement of the camera also referred to as “dolly”.Thus, simulated camera movement can include any geometrical distortionand may create a foreshortening effect based on the location of theforeground and the background relative to the camera.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Several embodiments are described herein that use information obtainedfrom reference images for processing a main image. That is, the datathat are used to process the main image come at least not solely fromthe image itself, but instead or also from one or more separate“reference” images.

Reference Image

Reference images provide supplemental meta data, and in particularsupplemental visual data to an acquired image, or main image. Thereference image can be a single instance, or in general, a collection ofone or more images varying from each other. The so-defined referenceimage(s) provides additional information that may not be available aspart of the main image.

Example of a spatial collection may be multiple sensors all located indifferent positions relative to each other. Example of temporaldistribution can be a video stream.

The reference image differs from the main captured image, and themultiple reference images differ from each other in various potentialmanners which can be based on one or combination of permutations in time(temporal), position (spatial), optical characteristics, resolution, andspectral response, among other parameters.

One example is temporal disparity. In this case, the reference image iscaptured before and/or after the main captured image, and preferablyjust before and/or just after the main image. Examples may includepreview video, a pre-exposed image, and a post-exposed image. In certainembodiments, such reference image uses the same optical system as theacquired image, while in other embodiments, wholly different opticalsystems or optical systems that use one or more different opticalcomponents such as a lens, an optical detector and/or a programcomponent.

Alternatively, a reference image may differ in the location of secondarysensor or sensors, thus providing spatial disparity. The images may betaken simultaneously or proximate to or in temporal overlap with a mainimage. In this case, the reference image may be captured using aseparate sensor located away from the main image sensor. The system mayuse a separate optical system, or via some splitting of a single opticalsystem into a plurality of sensors or a plurality of sub-pixels of asame sensor. As digital optical systems become smaller dual or multisensor capture devices will become more ubiquitous. Some addedregistration and/or calibration may be typically involved when twooptical systems are used.

Alternatively, one or more reference images may also be captured usingdifferent spectral responses and/or exposure settings. One exampleincludes an infra red sensor to supplement a normal sensor or a sensorthat is calibrated to enhance specific ranges of the spectral responsesuch as skin tone, highlights or shadows.

Alternatively, one or more reference images may also be captured usingdifferent capture parameters such as exposure time, dynamic range,contrast, sharpness, color balance, white balance or combinationsthereof based on any image parameters the camera can manipulate.

Alternatively, one or more reference images may also be captured using asecondary optical system with a differing focal length, depth of field,depth of focus, exit pupil, entry pupil, aperture, or lens coating, orcombinations thereof based on any optical parameters of a designed lens.

Alternatively, one or more reference images may also capture a portionof the final image in conjunction with other differentials. Such examplemay include capturing a reference image that includes only the center ofthe final image, or capturing only the region of faces from the finalimage. This allows saving capture time and space while keeping asreference important information that may be useful at a later stage.

Reference images may also be captured using varying attributes asdefined herein of nominally the same scene recorded onto different partsof a same physical sensor. As an example, one optical subsystem focusesthe scene image onto a small area of the sensor, while a second opticalsubsystem focuses the scene image, e.g., the main image, onto a muchlarger area of the sensor. This has the advantage that it involves onlyone sensor and one post-processing section, although the twoindependently acquired scene images will be processed separately, i.e.,by accessing the different parts of the sensor array. This approach hasanother advantage, which is that a preview optical system may beconfigured so it can change its focal point slightly, and during acapture process, a sequence of preview images may be captured by movingan optical focus to different parts of the sensor. Thus, multiplepreview images may be captured while a single main image is captured. Anadvantageous application of this embodiment would be motion analysis.

Getting data from a reference image in a preview or postview process isakin to obtaining meta data rather than the image-processing that isperformed using the meta data. That is, the data used for processing amain image, e.g., to enhance its quality, is gathered from one or morepreview or postview images, while the primary source of image data iscontained within the main image itself. This preview or postviewinformation can be useful as clues for capturing and/or processing themain image, whether it is desired to perform red-eye detection andcorrection, face tracking, motion blur processing, dust artefactcorrection, illumination or resolution enhancement, image qualitydetermination, foreground/background segmentation, and/or another imageenhancement processing technique. The reference image or images may besaved as part of the image header for post processing in the capturedevice, or alternatively after the data is transferred on to an externalcomputation device. In some cases, the reference image may only be usedif the post processing software determines that there is missing data,damaged data or need to replace portions of the data.

In order to maintain storage and computation efficiency, the referenceimage may also be saved as a differential of the final image. Examplemay include a differential compression or removal of all portions thatare identical or that can be extracted from the final image.

Correcting Eye Defects

In one example involving red-eye correction, a face detection processmay first find faces, find eyes in a face, and check if the pupils arered, and if red pupils are found, then the red color pupils arecorrected, e.g., by changing their color to black. Another red-eyeprocess may involve first finding red in a digital image, checkingwhether the red pixels are contained in a face, and checking whether thered pixels are in the pupil of an eye. Depending on the quality of facedetection available, one or the other of these may be preferred. Eitherof these may be performed using one or more preview or postview images,or otherwise using a reference image, rather than or in combinationwith, checking the main image itself. A red-eye filter may be based onuse of acquired preview, postview or other reference image or images,and can determine whether a region may have been red prior to applying aflash.

Another known problem involves involuntary blinking In this case, thepost processing may determine that the subject's eyes were closed orsemi closed. If there exists a reference image that was capturedtime-wise either a fraction of a second before or after such blinking,the region of the eyes from the reference image can replace the blinkingeye portion of the final image.

In some cases as defined above, the camera may store as the referenceimage only high resolution data of the Region of Interest (ROI) thatincludes the eye locations to offer such retouching.

Face Tools

Multiple reference images may be used, for example, in a face detectionprocess, e.g., a selected group of preview images may be used. By havingmultiple images to choose from, the process is more likely to have amore optimal reference image to operate with. In addition, a facetracking process generally utilizes two or more images anyway, beginningwith the detection of a face in at least one of the images. Thisprovides an enhanced sense of confidence that the process providesaccurate face detection and location results.

Moreover, a perfect image of a face may be captured in a referenceimage, while a main image may include an occluded profile or some otherless than optimal feature. By using the reference image, the personwhose profile is occluded may be identified and even have her headrotated and unblocked using reference image data before or after takingthe picture. This can involve upsampling and aligning a portion of thereference image, or just using information as to color, shape,luminance, etc., determined from the reference image. A correct exposureon a region of interest or ROI may be extrapolated using the referenceimage. The reference image may include a lower resolution or evensubsampled resolution version of the main image or another image ofsubstantially a same scene as the main image.

Meta data that is extracted from one or more reference images may beadvantageously used in processes involving face detection, facetracking, red-eye, dust or other unwanted image artefact detectionand/or correction, or other image quality assessment and/or enhancementprocess. In this way, meta data, e.g., coordinates and/or othercharacteristics of detected faces, may be derived from one or morereference images and used for main image quality enhancement withoutactually looking for faces in the main image.

A reference image may also be used to include multiple emotions of asingle subject into a single object. Such emotions may be used to createmore comprehensive data of the person, such as smile, frown, wink,and/or blink. Alternatively, such data may also be used to post processediting where the various emotions can be cut-and-pasted to replacebetween the captured and the reference image. An example may includeswitching between a smile to a sincere look based on the same image.

Finally, the reference image may be used for creating athree-dimensional representation of the image which can allow rotatingsubjects or the creation of three dimensional representations of thescene such as holographic imaging or lenticular imaging.

Motion Correction

A reference image may include an image that differs from a main image inthat it may have been captured at a different time before or after themain image. The reference image may have spatial differences such asmovements of a subject or other object in a scene, and/or there may be aglobal movement of the camera itself. The reference image may,preferably in many cases, have lower resolution than the main image,thus saving valuable processing time, bytes, bitrate and/or memory, andthere may be applications wherein a higher resolution reference imagemay be useful, and reference images may have a same resolution as themain image. The reference image may differ from the main image in aplanar sense, e.g., the reference image can be infrared or Gray Scale,or include a two bit per color scheme, while the main image may be afull color image. Other parameters may differ such as illumination,while generally the reference image, to be useful, would typically havesome common overlap with the main image, e.g., the reference image maybe of at least a similar scene as the main image, and/or may be capturedat least somewhat closely in time with the main image.

Some cameras (e.g., the Kodak V570, seehttp://www.dcviews.com/_kodak/v570.htm) have a pair of CCDs, which mayhave been designed to solve the problem of having a single zoom lens. Areference image can be captured at one CCD while the main image is beingsimultaneously captured with the second CCD, or two portions of a sameCCD may be used for this purpose. In this case, the reference image isneither a preview nor a postview image, yet the reference image is adifferent image than the main image, and has some temporal or spatialoverlap, connection or proximity with the main image. A same ordifferent optical system may be used, e.g., lens, aperture, shutter,etc., while again this would typically involve some additionalcalibration. Such dual mode system may include a IR sensor, enhanceddynamic range, and/or special filters that may assist in variousalgorithms or processes.

In the context of blurring processes, i.e., either removing cameramotion blur or adding blur to background sections of images, a blurredimage may be used in combination with a non-blurred image to produce afinal image having a non-blurred foreground and a blurred background.Both images may be deemed reference images which are each partly used toform a main final image, or one may be deemed a reference image having aportion combined into a main image. If two sensors are used, one couldsave a blurred image at the same time that the other takes a sharpimage, while if only a single sensor is used, then the same sensor couldtake a blurred image followed by taking a sharp image, or vice-versa. Amap of systematic dust artefact regions may be acquired using one ormore reference images.

Reference images may also be used to disqualify or supplement imageswhich have with unsatisfactory features such as faces with blinks,occlusions, or frowns.

Foreground/Background Processing

A method is provided for distinguishing between foreground andbackground regions of a digital image of a scene. The method includescapturing first and second images of nominally the same scene andstoring the captured images in DCT-coded format. These images mayinclude a main image and a reference image, and/or simply first andsecond images either of which images may comprise the main image. Thefirst image may be taken with the foreground more in focus than thebackground, while the second image may be taken with the background morein focus than the foreground. Regions of the first image may be assignedas foreground or background according to whether the sum of selectedhigh order DCT coefficients decreases or increases for equivalentregions of the second image. In accordance with the assigning, one ormore processed images based on the first image or the second image, orboth, are rendered at a digital rendering device, display or printer, orcombinations thereof.

This method lends itself to efficient in-camera implementation due tothe relatively less-complex nature of calculations utilized to performthe task.

In the present context, respective regions of two images of nominallythe same scene are said to be equivalent if, in the case where the twoimages have the same resolution, the two regions correspond tosubstantially the same part of the scene. If, in the case where oneimage has a greater resolution than the other image, the part of thescene corresponding to the region of the higher resolution image issubstantially wholly contained within the part of the scenecorresponding to the region of the lower resolution image. Preferably,the two images are brought to the same resolution by sub-sampling thehigher resolution image or upsampling the lower resolution image, or acombination thereof. The two images are preferably also aligned, sizedor other process to bring them to overlapping as to whatsoever relevantparameters for matching.

Even after subsampling, upsampling and/or alignment, the two images maynot be identical to each other due to slight camera movement or movementof subjects and/or objects within the scene. An additional stage ofregistering the two images may be utilized.

Where the first and second images are captured by a digital camera, thefirst image may be a relatively high resolution image, and the secondimage may be a relatively low resolution pre- or post-view version ofthe first image.

While the image is captured by a digital camera, the processing may bedone in the camera as post processing, or externally in a separatedevice such as a personal computer or a server computer. In such case,both images can be stored. In the former embodiment, two DCT-codedimages can be stored in volatile memory in the camera for as long asthey are being used for foreground/background segmentation and finalimage production. In the latter embodiment, both images may bepreferably stored in non-volatile memory. In the case of lowerresolution pre-or-post view images, the lower resolution image may bestored as part of the file header of the higher resolution image.

In some cases only selected regions of the image are stored as twoseparated regions. Such cases include foreground regions that maysurround faces in the picture. In one embodiment, if it is known thatthe images contain a face, as determined, for example, by a facedetection algorithm, processing can be performed just on the regionincluding and surrounding the face to increase the accuracy ofdelimiting the face from the background.

Inherent frequency information as to DCT blocks is used to provide andtake the sum of high order DCT coefficients for a DCT block as anindicator of whether a block is in focus or not. Blocks whose high orderfrequency coefficients drop when the main subject moves out of focus aretaken to be foreground with the remaining blocks representing backgroundor border areas. Since the image acquisition and storage process in adigital camera typically codes captured images in DCT format as anintermediate step of the process, the method can be implemented in suchcameras without substantial additional processing.

This technique is useful in cases where differentiation created bycamera flash, as described in U.S. application Ser. No. 11/217,788,published as 2006/0039690, incorporated by reference (see also U.S. Ser.No. 11/421,027) may not be sufficient. The two techniques may also beadvantageously combined to supplement one another.

Methods are provided that lend themselves to efficient in-cameraimplementation due to the computationally less rigorous nature ofcalculations used in performing the task in accordance with embodimentsdescribed herein.

A method is also provided for determining an orientation of an imagerelative to a digital image acquisition device based on aforeground/background analysis of two or more images of a scene.

Further embodiments are described below including methods and devicesfor providing or suggesting options for automatic digital imageenhancements based on information relating to the location, position,focus, exposure or other parameter or values of parameters of region ofinterests and in particular faces in an image. Such parameters or valuesof parameter may include a spatial parameter.

A still image may be animated and used in a slide show by simulatedcamera movement, e.g., zooming, panning and/or rotating where the centerpoint of an image is within a face or at least the face is included inall or substantially all of the images in the slide show.

A preferred embodiment includes an image processing application whetherimplemented in software or in firmware, as part of the image captureprocess, image rendering process, or as part of post processing. Thissystem receives images in digital form, where the images can betranslated into a grid representation including multiple pixels. Thisapplication detects and isolates the faces from the rest of the picture,and determines sizes and locations of the faces relative to otherportions of the image or the entire image. Orientations of the faces mayalso be determined. Based on information regarding detected faces,preferably separate modules of the system collect facial data andperform image enhancement operations based on the collected facial data.Such enhancements or corrections include automatic orientation of theimage, color correction and enhancement, digital fill flash simulationand dynamic compression.

Advantages of the preferred embodiments include the ability toautomatically perform or suggest or assist in performing complex tasksthat may otherwise call for manual intervention and/or experimenting.Another advantage is that important regions, e.g., faces, of an imagemay be assigned, marked and/or mapped and then processing may beautomatically performed and/or suggested based on this informationrelating to important regions of the images. Automatic assistance may beprovided to a photographer in the post processing stage. Assistance maybe provided to the photographer in determining a focus and an exposurewhile taking a picture. Meta-data may be generated in the camera thatwould allow an image to be enhanced based on the face information.

Many advantageous techniques are provided in accordance with preferredand alternative embodiments set forth herein. For example, a method ofprocessing a digital image using face detection within said image toachieve one or more desired image processing parameters is provided. Agroup of pixels is identified that correspond to an image of a facewithin the digital image. Default values are determined of one or moreparameters of at least some portion of said digital image. Values of theone or more parameters are adjusted within the digitally-detected imagebased upon an analysis of said digital image including said image ofsaid face and said default values.

The digital image may be digitally-acquired and/or may bedigitally-captured. Decisions for processing the digital image based onsaid face detection, selecting one or more parameters and/or foradjusting values of one or more parameters within the digital image maybe automatically, semi-automatically or manually performed. Similarly,on the other end of the image processing workflow, the digital image maybe rendered from its binary display onto a print, or a electronicdisplay.

One or more different degrees of simulated fill flash may be created bymanual, semi-automatic or automatic adjustment. The analysis of theimage of the face may include a comparison of an overall exposure to anexposure around the identified face. The exposure may be calculatedbased on a histogram. Digitally simulation of a fill flash may includeoptionally adjusting tone reproduction and/or locally adjustingsharpness. One or more objects estimated to be closer to the camera orof higher importance may be operated on in the simulated fill-flash.These objects determined to be closer to the camera or of higherimportance may include one or more identified faces. A fill flash or anoption for providing a suggested fill-flash may be automaticallyprovided. The method may be performed within a digital acquisitiondevice, a digital rendering device, or an external device or acombination thereof.

The face pixels may be identified, a false indication of another facewithin the image may be removed, and an indication of a face may beadded within the image, each manually by a user, or semi-automaticallyor automatically using image processing apparatus. The face pixelsidentifying may be automatically performed by an image processingapparatus, and a manual verification of a correct detection of at leastone face within the image may be provided.

A method of digital image processing using face detection to achieve adesired image parameter is further provided including identifying agroup of pixels that correspond to an image of a face within adigitally-detected image. Initial values of one or more parameters of atleast some of the pixels are determined. An initial parameter of thedigitally-detected image is determined based on the initial values.Values of the one or more parameters of pixels within thedigitally-detected image are automatically adjusted based upon acomparison of the initial parameter with the desired parameter or anoption for adjusting the values is automatically provided.

The digitally-detected image may include a digitally-acquired, renderedand/or digitally-captured image. The initial parameter of thedigitally-detected image may include an initial parameter of the faceimage. The one or more parameters may include any of orientation, color,tone, size, luminance, and focus. The method may be performed within adigital camera as part of a pre-acquisition stage, within a camera aspart of post processing of the captured image or within externalprocessing equipment. The method may be performed within a digitalrendering device such as a printer, or as a preparation for sending animage to an output device, such as in the print driver, which may belocated in the printer or on an external device such as the PC, as partof a preparation stage prior to displaying or printing the image. Anoption to manually remove a false indication of a face or to add anindication of a face within the image may be included. An option tomanually override, the automated suggestion of the system, whether ornot faces were detected, may be included.

The method may include identifying one or more sub-groups of pixels thatcorrespond to one or more facial features of the face. Initial values ofone or more parameters of pixels of the one or more sub-groups of pixelsmay be determined. An initial spatial parameter of the face within thedigital image may be determined based on the initial values. The initialspatial parameter may include any of orientation, size and location.

When the spatial parameter is orientation, values of one or moreparameters of pixels may be adjusted for re-orienting the image to anadjusted orientation. The one or more facial features may include one ormore of an eye, a mouth, two eyes, a nose, an ear, neck, shouldersand/or other facial or personal features, or other features associatedwith a person such as an article of clothing, furniture, transportation,outdoor environment (e.g., horizon, trees, water, etc.) or indoorenvironment (doorways, hallways, ceilings, floors, walls, etc.), whereinsuch features may be indicative of an orientation. The one or morefacial or other features may include two or more features, and theinitial orientation may be determined base on relative positions of thefeatures that are determined based on the initial values. A shape suchas a triangle may be generated for example between the two eyes and thecenter of the mouth, a golden rectangle as described above, or moregenerically, a polygon having points corresponding to preferably threeor more features as vertices or axis.

Initial values of one or more chromatic parameters, such as color andtone, of pixels of the digital image may be determined. The values ofone or more parameters may be automatically adjusted or an option toadjust the values to suggested values may be provided.

The method may be performed within any digital image capture device,which as, but not limited to digital still camera or digital videocamera. The one or more parameters may include overall exposure,relative exposure, orientation, color balance, white point, tonereproduction, size, or focus, or combinations thereof. The face pixelsidentifying may be automatically performed by an image processingapparatus, and the method may include manually removing one or more ofthe groups of pixels that correspond to an image of a face. Anautomatically detected face may be removed in response to falsedetection of regions as faces, or in response to a determination toconcentrate on less image faces or images faces that were manuallydetermined to be of higher subjective significance, than facesidentified in the identifying step. A face may be removed by increasinga sensitivity level of said face identifying step. The face removal maybe performed by an interactive visual method, and may use an imageacquisition built-in display.

The face pixels identifying may be performed with an image processingapparatus, and may include manually adding an indication of another facewithin the image. The image processing apparatus may receive a relativevalue as to a detection assurance or an estimated importance of thedetected regions. The relative value may be manually modified as to theestimated importance of the detected regions.

Within a digital camera, a method of digital image processing using facedetection for achieving a desired image parameter is further provided. Agroup of pixels is identified that correspond to a face within a digitalimage. First initial values of a parameter of pixels of the group ofpixels are determined, and second initial values of a parameter ofpixels other than pixels of the group of pixels are also determined. Thefirst and second initial values are compared. Adjusted values of theparameter are determined based on the comparing of the first and secondinitial values and on a comparison of the parameter corresponding to atleast one of the first and second initial values and the desired imageparameter.

Initial values of luminance of pixels of the group of pixelscorresponding to the face may be determined. Other initial values ofluminance of pixels other than the pixels corresponding to the face mayalso be determined. The values may then be compared, and properties ofaperture, shutter, sensitivity and a fill flash may be determined forproviding adjusted values corresponding to at least some of the initialvalues for generating an adjusted digital image. The pixelscorresponding to the face may be determined according to sub-groupscorresponding to one or more facial features.

A method of generating one or more new digital images using an originaldigitally-acquired image including a face is further provided. A groupof pixels that correspond to a face within the originaldigitally-acquired image is identified. A portion of the original imageis selected to include the group of pixels. Values of pixels of one ormore new images based on the selected portion are automaticallygenerated, or an option to generate them is provided, in a manner whichalways includes the face within the one or more new images.

A transformation may be gradually displayed between the originaldigitally-acquired image and one or more new images. Parameters of saidtransformation may be adjusted between the original digitally-acquiredimage and one or more new images. Parameters of the transformationbetween the original digitally-acquired image, e.g., including a face,and one or more new images may be selected from a set of at least one ormore criteria including timing or blending or a combination thereof. Theblending may include dissolving, flying, swirling, appearing, flashing,or screening, or combinations thereof.

Methods of generating slide shows that use an image including a face areprovided in accordance with the generation of one or more new images. Agroup of pixels is identified that correspond to a face within adigitally-acquired image. A zoom portion of the image including thegroup of pixels may be determined. The image may be automatically zoomedto generate a zoomed image including the face enlarged by the zooming,or an option to generate the zoomed image may be provided. A centerpoint of zooming in or out and an amount of zooming in or out may bedetermined after which another image may be automatically generatedincluding a zoomed version of the face, or an option to generate theimage including the zoomed version of the face may be provided. One ormore new images may be generated each including a new group of pixelscorresponding to the face, automatic panning may be provided using theone or more new images.

A method of generating one or more new digital images using an originaldigitally-acquired image including a face is further provided. One ormore groups of pixels may be identified that correspond to two or morefaces within the original digitally-acquired image. A portion of theoriginal image may be selected to include the group of pixels. Values ofpixels may be automatically generated of one or more new images based onthe selected portion in a manner which always includes at least one ofthe two or more faces within the one or more new images or a panningintermediate image between two of the faces of said two or moreidentified faces or a combination thereof.

Panning may be performed between the two or more identified faces. Thepanning may be from a first face to a second face of the two or moreidentified faces, and the second face may then be zoomed. The first facemay be de-zoomed prior to panning to the second face. The second facemay also be zoomed. The panning may include identifying a panningdirection parameter between two of the identified faces. The panning mayinclude sequencing along the identified panning direction between thetwo identified faces according to the identified panning directionparameter.

A method of digital image processing using face detection for achievinga desired spatial parameter is further provided including identifying agroup of pixels that correspond to a face within a digital image,identifying one or more sub-groups of pixels that correspond to one ormore facial features of the face, determining initial values of one ormore parameters of pixels of the one or more sub-groups of pixels,determining an initial spatial parameter of the face within the digitalimage based on the initial values, and determining adjusted values ofpixels within the digital image for adjusting the image based on acomparison of the initial and desired spatial parameters.

The initial spatial parameter may include orientation. The values of thepixels may be automatically adjusted within the digital image to adjustthe initial spatial parameter approximately to the desired spatialparameter. An option may be automatically provided for adjusting thevalues of the pixels within the digital image to adjust the initialspatial parameter to the desired spatial parameter.

A method of digital image processing using face detection is alsoprovided wherein a first group of pixels that correspond to a facewithin a digital image is identified, and a second group of pixels thatcorrespond to another feature within the digital image is identified. Are-compositioned image is determined including a new group of pixels forat least one of the face and the other feature. The other feature mayinclude a second face. The re-compositioned image may be automaticallygenerated or an option to generate the re-compositioned image may beprovided. Values of one or more parameters of the first and secondgroups of pixels, and relative-adjusted values, may be determined forgenerating the re-compositioned image.

Each of the methods provided are preferably implemented within softwareand/or firmware either in the camera, the rendering device such asprinters or display, or with external processing equipment. The softwaremay also be downloaded into the camera or image processing equipment. Inthis sense, one or more processor readable storage devices havingprocessor readable code embodied thereon are provided. The processorreadable code programs one or more processors to perform any of theabove or below described methods.

FIG. 1a illustrates a preferred embodiment. An image is opened by theapplication in block 102. The software then determines whether faces arein the picture as described in block 106. If no faces are detected, thesoftware ceases to operate on the image and exits, 110.

Alternatively, the software may also offer a manual mode, where theuser, in block 116 may inform the software of the existence of faces,and manually marks them in block 118. The manual selection may beactivated automatically if no faces are found, 116, or it may even beoptionally activated after the automatic stage to let the user, via someuser interface to either add more faces to the automatic selection 112or even 114, remove regions that are mistakenly 110 identified by theautomatic process 118 as faces. Additionally, the user may manuallyselect an option that invokes the process as defined in 106. This optionis useful for cases where the user may manually decide that the imagecan be enhanced or corrected based on the detection of the faces.Various ways that the faces may be marked, whether automatically ofmanually, whether in the camera or by the applications, and whether thecommand to seek the faces in the image is done manually orautomatically, are all included in preferred embodiments herein.

In an alternative embodiment, the face detection software may beactivated inside the camera as part of the acquisition process, asdescribed in Block 104. This embodiment is further depicted in FIG. 1 b.In this scenario, the face detection portion 106 may be implementeddifferently to support real time or near real time operation. Suchimplementation may include sub-sampling of the image, and weightedsampling to reduce the number of pixels on which the computations areperformed.

In an alternative embodiment, the face detection software may beactivated inside the rendering device as part of the output process, asdescribed in Block 103. This embodiment is further depicted in FIG. 1 c.In this scenario, the face detection portion 106 may be implementedeither within the rendering device, or within a en external driver tosuch device.

After the faces are tagged, or marked, whether manually as defined in106, or automatically, 118, the software is ready to operate on theimage based on the information generated by the face-detection stage.The tools can be implemented as part of the acquisition, as part of thepost-processing, or both.

Block 120 describes panning and zooming into the faces. This tool can bepart of the acquisition process to help track the faces and create apleasant composition, or as a post processing stage for either croppingan image or creating a slide show with the image, which includesmovement. This tool is further described in FIG. 6.

Block 130 depicts the automatic orientation of the image, a tool thatcan be implemented either in the camera as art of the acquisition postprocessing, or on a host software. This tool is further described inFIGS. 2a -2 e.

Block 140 describes the way to color-correct the image based on the skintones of the faces. This tool can be part of the automatic colortransformations that occur in the camera when converting the image fromthe RAW sensor data form onto a known, e.g. RGB representation, or laterin the host, as part of image enhancement software. The various imageenhancement operations may be global, affecting the entire image, suchas rotation, and/or may be selective based on local criteria. Forexample, in a selective color or exposure correction as defined in block140, a preferred embodiment includes corrections done to the entireimage, or only to the face regions in a spatially masked operation, orto specific exposure, which is a luminance masked operation. Note alsothat such masks may include varying strength, which correlates tovarying degrees of applying a correction. This allows a localenhancement to better blend into the image.

Block 150 describes the proposed composition such as cropping andzooming of an image to create a more pleasing composition. This tool,150 is different from the one described in block 120 where the faces areanchors for either tracking the subject or providing camera movementbased on the face location.

Block 160 describes the digital-fill-flash simulation which can be donein the camera or as a post processing stage. This tool is furtherdescribed in FIGS. 4a -4 e. Alternatively to the digital fill flash,this tool may also be an actual flash sensor to determine if a fillflash is needed in the overall exposure as described in Block 170. Inthis case, after determining the overall exposure of the image, if thedetected faces in the image are in the shadow, a fill flash willautomatically be used. Note that the exact power of the fill flash,which should not necessarily be the maximum power of the flash, may becalculated based on the exposure difference between the overall imageand the faces. Such calculation is well known to the one skilled in theart and is based on a tradeoff between aperture, exposure time, gain andflash power.

This tool is further described in FIG. 4e . Block 180 describes theability of the camera to focus on the faces. This can be used as apre-acquisition focusing tool in the camera, as further illustrated inFIG. 7.

Referring to FIG. 1 b, which describes a process of using face detectionto improve in camera acquisition parameters, as aforementioned in FIG. 1a, block 106. In this scenario, a camera is activated, 1000, for exampleby means of half pressing the shutter, turning on the camera, etc. Thecamera then goes through the normal pre-acquisition stage to determine,1004, the correct acquisition parameters such as aperture, shutterspeed, flash power, gain, color balance, white point, or focus. Inaddition, a default set of image attributes, particularly related topotential faces in the image, are loaded, 1002. Such attributes can bethe overall color balance, exposure, contrast, orientation etc.

An image is then digitally captured onto the sensor, 1010. Such actionmay be continuously updated, and may or may not include saving suchcaptured image into permanent storage.

An image-detection process, preferably a face detection process, isapplied to the captured image to seek faces in the image, 1020. If noimages are found, the process terminates, 1032. Alternatively, or inaddition to the automatic detection of 1030, the user can manuallyselect, 1034 detected faces, using some interactive user interfacemechanism, by utilizing, for example, a camera display. Alternatively,the process can be implemented without a visual user interface bychanging the sensitivity or threshold of the detection process.

When faces are detected, 1040, they are marked, and labeled. Detectingdefined in 1040 may be more than a binary process of selecting whether aface is detected or not. It may also be designed as part of a processwhere each of the faces is given a weight based on size of the faces,location within the frame, other parameters described herein, etc.,which define the importance of the face in relation to other facesdetected.

Alternatively, or in addition, the user can manually deselect regions,1044 that were wrongly false detected as faces. Such selection can bedue to the fact that a face was false detected or when the photographermay wish to concentrate on one of the faces as the main subject matterand not on other faces. Alternatively, 1046, the user may re-select, orempahsize one or more faces to indicate that these faces have a higherimportance in the calculation relative to other faces. This process asdefined in 1046, further defines the preferred identification process tobe a continuous value one as opposed to a binary one. The process can bedone utilizing a visual user interface or by adjusting the sensitivityof the detection process. After the faces are correctly isolated, 1040,their attributes are compared, 1050 to default values that werepredefined in 1002. Such comparison will determine a potentialtransformation between the two images, in order to reach the samevalues. The transformation is then translated to the camera captureparameters, 1070, and the image, 1090 is acquired.

A practical example is that if the captured face is too dark, theacquisition parameters may change to allow a longer exposure, or openthe aperture. Note that the image attributes are not necessarily onlyrelated to the face regions but can also be in relations to the overallexposure. As an exemplification, if the overall exposure is correct butthe faces are underexposed, the camera may shift into a fill-flash modeas subsequently illustrated in FIG. 4a -4 f.

FIG. 1c illustrates a process of using face detection to improve outputor rendering parameters, as aforementioned in FIG. 1 a, block 103. Inthis scenario, a rendering device such as a printer or a display, hereinreferred to as the Device, activated, 1100. Such activation can beperformed for example within a printer, or alternatively within a deviceconnected to the printer such as a PC or a camera. The device then goesthrough the normal pre-rendering stage to determine, 1104, the correctrendering parameters such as tone reproduction, color transformationprofiles, gain, color balance, white point and resolution. In addition,a default set of image attributes, particularly related to potentialfaces in the image, are loaded, 1102. Such attributes can be the overallcolor balance, exposure, contrast, orientation etc.

An image is then digitally downloaded onto the device, 1110. Animage-detection process, preferably a face detection process, is appliedto the downloaded image to seek faces in the image, 1120. If no imagesare found, the process terminates, 1132 and the device resumes itsnormal rendering process. Alternatively, or in addition to the automaticdetection of 1130, the user can manually select, 1134 detected faces,using some interactive user interface mechanism, by utilizing, forexample, a display on the device. Alternatively, the process can beimplemented without a visual user interface by changing the sensitivityor threshold of the detection process. When faces are detected, 1040,they are marked, and labeled. Detecting defined in 1140 may be more thana binary process of selecting whether a face is detected or not. It mayalso be designed as part of a process where each of the faces is given aweight based on size of the faces, location within the frame, otherparameters described herein, etc., which define the importance of theface in relation to other faces detected.

Alternatively, or in addition, the user can manually deselect regions,1144 that were wrongly false detected as faces. Such selection can bedue to the fact that a face was false detected or when the photographermay wish to concentrate on one of the faces as the main subject matterand not on other faces. Alternatively, 1146, the user may re-select, oremphasize one or more faces to indicate that these faces have a higherimportance in the calculation relative to other faces. This process asdefined in 1146, further defines the preferred identification process tobe a continuous value one as opposed to a binary one. The process can bedone utilizing a visual user interface or by adjusting the sensitivityof the detection process. After the faces are correctly isolated, 1140,their attributes are compared, 1150 to default values that werepredefined in 1102. Such comparison will determine a potentialtransformation between the two images, in order to reach the samevalues. The transformation is then translated to the device renderingparameters, 1170, and the image, 1190 is rendered. The process mayinclude a plurality of images. In this case 1180, the process repeatsitself for each image prior to performing the rendering process. Apractical example is the creation of a thumbnail or contact sheet whishis a collection of low resolution images, on a single display instance.

A practical example is that if the face was too dark captured, therendering parameters may change the tone reproduction curve to lightenthe face. Note that the image attributes are not necessarily onlyrelated to the face regions but can also be in relations to the overalltone reproduction.

Referring to FIGS. 2a -2 e, which describe the invention of automaticrotation of the image based on the location and orientation of faces, ashighlighted in FIG. 1 Block 130. An image of two faces is provided inFIG. 2a . Note that the faces may not be identically oriented, and thatthe faces may be occluding.

The software in the face detection stage, including the functionality ofFIG. 1 a, blocks 108 and 118, will mark the two faces, of the mother andson as an estimation of an ellipse 210 and 220 respectively. Using knownmathematical means, such as the covariance matrix of the ellipse, thesoftware will determine the main axis of the two faces, 212 and 222respectively as well as the secondary axis 214 and 224. Even at thisstage, by merely comparing the sizes of the axis, the software mayassume that the image is oriented 90 degrees, in the case that thecamera hel helo in landscape mode, which is horizontal, or in portraitmode which is vertical or +90 degrees, aka clockwise, or −90 degrees akacounter clockwise. Alternatively, the application may also be utilizedfor any arbitrary rotation value. However this information may notsuffice to decide whether the image is rotated clockwise orcounter-clockwise.

FIG. 2c describes the step of extracting the pertinent features of aface, which are usually highly detectable. Such objects may include theeyes, 214, 216 and 224, 226, and the lips, 218 and 228. The combinationof the two eyes and the center of the lips creates a triangle 230 whichcan be detected not only to determine the orientation of the face butalso the rotation of the face relative to a facial shot. Note that thereare other highly detectable portions of the image which can be labeledand used for orientation detection, such as the nostrils, the eyebrows,the hair line, nose bridge and the neck as the physical extension of theface etc. In this figure, the eyes and lips are provided as an exampleof such facial features Based on the location of the eyes if found, andthe mouth, the image may, e.g., need to be rotated in a counterclockwise direction.

Note that it may not be enough to just locate the different facialfeatures, but it may be necessary to compare such features to eachother. For example, the color of the eyes may be compared to ensure thatthe pair of eyes originate form the same person. Another example is thatin FIGS. 2-c and 2-d, if the software combined the mouth of 218 with theeyes of 226, 224, the orientation would have been determined asclockwise. In this case, the software detects the correct orientation bycomparing the relative size of the mouth and the eyes. The above methoddescribes means of determining the orientation of the image based on therelative location of the different facial objects. For example, it maybe desired that the two eyes should be horizontally situated, the noseline perpendicular to the eyes, the mouth under the nose etc.Alternatively, orientation may be determined based on the geometry ofthe facial components themselves. For example, it may be desired thatthe eyes are elongated horizontally, which means that when fitting anellipse on the eye, such as described in blocs 214 and 216, it may bedesired that the main axis should be horizontal. Similar with the lipswhich when fitted to an ellipse the main axis should be horizontal.Alternatively, the region around the face may also be considered. Inparticular, the neck and shoulders which are the only contiguous skintone connected to the head can be an indication of the orientation anddetection of the face.

FIG. 2-e illustrates the image as correctly oriented based on the facialfeatures as detected. In some cases not all faces will be oriented thesame way. In such cases, the software may decide on other criteria todetermine the orientation of the prominent face in the image. Suchdetermination of prominence can be based on the relevant size of thefaces, the exposure, or occlusion.

If a few criteria are tested, such as the relationship between differentfacial components and or the orientation of individual components, notall results will be conclusive to a single orientation. This can be dueto false detections, miscalculations, occluding portions of faces,including the neck and shoulders, or the variability between faces. Insuch cases, a statistical decision may be implemented to address thedifferent results and to determine the most likely orientation. Suchstatistical process may be finding the largest results (simple count),or more sophisticated ordering statistics such as correlation orprincipal component analysis, where the basis function will be theorientation angle. Alternatively or in addition, the user may manuallyselect the prominent face or the face to be oriented. The particularorientation of the selected or calculated prominent face may itself beautomatically determined, programmed, or manually determined by a user.

The process for determining the orientation of images can be implementedin a preferred embodiment as part of a digital display device.Alternatively, this process can be implemented as part of a digitalprinting device, or within a digital acquisition device.

The process can also be implemented as part of a display of multipleimages on the same page or screen such as in the display of acontact-sheet or a thumbnail view of images. In this case, the user mayapprove or reject the proposed orientation of the images individually orby selecting multiple images at once. In the case of a sequence ofimages, this invention may also determine the orientation of imagesbased on the information as approved by the user regarding previousimages.

FIGS. 3a-3f describe an illustrative process in which a proposedcomposition is offered based on the location of the face. As defined inFIG. 1a blocks 108 and 118, the face 320 is detected as are one or morepertinent features, as illustrated in this case, the eyes 322 and 324.The location of the eyes are then calculated based on the horizontal,330 and vertical 340 location. In this case, the face is located at thecenter of the image horizontally and at the top quarter vertically asillustrated in FIG. 3-d.

Based on common rules of composition and aesthetics, e.g., a face in aclose up may be considered to be better positioned, as in FIG. 3-e ifthe eyes are at the ⅔rd line as depicted in 350, and ⅓ to the left or ⅓to the right as illustrated in 360. Other similar rules may be thelocation of the entire face and the location of various portions of theface such as the eyes and lips based on aesthetic criteria such as theapplying the golden-ratio for faces and various parts of the face withinan image.

FIG. 3c introduces another aspect of face detection which may happenespecially in non-restrictive photography. The faces may not necessarilybe frontally aligned with the focal plane of the camera. In this figure,the object is looking to the side exposing partial frontal, or partialprofile of the face. In such cases, the software may elect to use, thecenter of the face, which in this case may align with the left eye ofthe subject. If the subject was in full frontal position, the softwaremay determine the center of the face to be around the nose bridge. Thecenter of the face may be determined to be at the center of a rectangle,ellipse or other shape generally determined to outline the face or atthe intersection of cross-hairs or otherwise as may be understood bythose skilled in the art (see, e.g., ellipse 210 of FIGS. 2b -2 e,ellipse 320 of FIG. 3b , ellipse 330 of FIG. 3c , the cross-hairs 350,360 of FIG. 3e ).

Based on the knowledge of the face and its pertinent features such aseyes, lips nose and ears, the software can either automatically or via auser interface that would recommend the next action to the user, cropportions of the image to reach such composition. For this specificimage, the software will eliminate the bottom region 370 and the rightportion 380. The process of re-compositioning a picture is subjective.In such case this invention will act as guidance or assistance to theuser in determining the most pleasing option out of potentially a few.In such a case a plurality of proposed compositions can be displayed andoffered to the user and the user will select one of them.

In an alternative embodiment, the process of re-compositioning the imagecan be performed within the image acquisition device as part of theimage taking process, whether as a pre-capture, pre-acquisition or postacquisition stage. In this scenario the acquisition device may display aproposed re-compositioning of the image on its display. Suchre-compositioning may be displayed in the device viewfinder or displaysimilarly to FIG. 3f , or alternatively as guidelines of cropping suchas lines 352 and 354. A user interface such will enable the user toselect form the original composed image, or the suggested one. Similarfunctionality can be offered as part of the post acquisition orotherwise referred to the playback mode.

In additional embodiments, the actual lines of aesthetics, for example,the ⅓^(rd) lines 350 and 350, may also be displayed to the use asassistance in determining the right composition. Referring to FIGS. 4a-4 f, the knowledge of the faces may assist the user in creating anautomatic effect that is otherwise created by a fill-flash. Fill-flashis a flash used where the main illumination is available light. In thiscase, the flash assists in opening up shadows in the image.Particularly, fill flash is used for images where the object in theforeground is in the shadow. Such instances occur for example when thesun is in front of the camera, thus casting a shadow on the object inthe foreground. In many cases the object includes people posing in frontof a background of landscape.

FIG. 4a illustrates such image. The overall image is bright due to thereflection of the sun in the water. The individuals in the foregroundare therefore in the shadow.

A certain embodiment of calculating the overall exposure can be doneusing an exposure histogram. Those familiar in the art may decide onother means of determining exposure, any of which may be used inaccordance with an alternative embodiment. When looking at the histogramof the luminance of the image at FIG. 4-b, there are three distinctareas of exposure which correspond to various areas. The histogramdepicts the concentration of pixels, as defined by the Y-Axis 416, as afunction of the different gray levels as defined by the X-axis 418. Thehigher the pixel count for a specific gray level, the higher the numberas depicted on the y-axis. Regions 410 are in the shadows which belongprimarily to the mother. The midtones in area 412 belong primarily tothe shaded foreground water and the baby. The highlights 414 are thewater. However, not all shadows may be in the foreground, and not allhighlights may be in the background. A correction of the exposure basedon the histogram may result in an unnatural correction.

When applying face detection, as depicted in FIG. 4-c, the histogram inFIG. 4-d may be substantially more clear. In this histogram, region 440depicts the faces which are in the shadow. Note that the actualselection of the faces, as illustrated in 4-c need not be a binary maskbut can be a gray scale mask where the boundaries are feathered orgradually changing. In addition, although somewhat similar in shape, theface region 440 may not be identical to the shadow region of the entireimage, as defined, e.g., in FIG. 4b at area 410. By applying exposurecorrection to the face regions as illustrated in FIG. 4-e, such aspassing the image through a lookup table 4-f, the effect is similar tothe one of a fill flash that illuminated the foreground, but did notaffect the background. By taking advantage of the gradual feathered maskaround the face, such correction will not be accentuated and noticed.FIG. 4e can also be performed manually thus allowing the user to createa varying effect of simulated fill flash. Alternatively, the softwaremay present the user with a selection of corrections based on differenttone reproduction curves and different regions for the user to choosefrom.

Although exposure, or tone reproduction, may be the most preferredenhancement to simulate fill flash, other corrections may apply such assharpening of the selected region, contrast enhancement, of even colorcorrection. Additional advantageous corrections may be understood bythose familiar with the effect of physical strobes on photographedimages.

Alternatively, as described by the flow chart of FIG. 4g , a similarmethod may be utilized in the pre-acquisition stage, to determine if afill flash is needed or not. The concept of using a fill flash is basedon the assumption that there are two types of light sources thatilluminate the image: an available external or ambient light source,which is controlled by the gain, shutter speed and aperture, and a flashwhich is only controlled by the flash power and affected by theaperture. By modifying the aperture vs. the shutter speed, the cameracan either enhance the effect of the flash or decrease it, whilemaintaining the overall exposure.

Referring now to FIG. 4g , a digital image is provided at 450. Adetermination is made at 460 whether faces were found in the image. Aswill be seen below, this process can be applied to other image featuresor regions within a digital image, e.g., a region including a face andalso its surroundings, or a portion of a face less than the entire face,such as the eyes or the mouth or the nose, or two of these, or abackground or foreground region within an image. If no faces (or otherregions or features, hereinafter only “faces” will be referred to, as anexample) are found, the process exits at 462. If a one or more faces isfound at 460, then the faces are automatically marked at 464. There canbe a manual step here instead of or in addition to the automatic markingat 464. A determination of exposure in face regions occurs at 470. Then,at 474 it is determined whether exposure of the face regions is lowerthan an overall exposure. If the exposure of the face regions is notlower than an overall exposure, then the image may be left as is bymoving the process to 478. If the exposure of the face regions is lowerthan an overall exposure, then a fill flash may be digitally simulatedat 480.

Referring still to FIG. 4g , an exemplary digital fill flash simulation480 includes creating masks to define one or more selected regions at482 a. Exposure of the selected regions is increased at 484 a.Sharpening is applied to the selected regions at 486 a. Tonereproduction is applied on selected regions 488 a. Single or multipleresults may be displayed to the user at 490 a, and then a user selects apreferred results at 492 a. An image may be displayed with a parameterto modify at 494 a, and then a user adjusts the extent of modificationat 496 a. After 492 a and/or 496 a correction is applied to the image at498.

Referring now to FIG. 4h , when the user activates the camera, in block104 (see also FIG. 1a ), the camera calculates the overall exposure, 482b. Such calculation is known to one skilled in the art and can be assophisticated as needed. In block 108, the camera searched for theexistence of faces in the image. An exposure is then calculated to theregions defined as belonging to the faces, 486 b. The disparity betweenthe overall exposure as determined in 484 b and the faces, 486 b iscalculated. If the face regions are substantially darker than theoverall exposure 486 b, the camera will then activate the flash in afill mode, 490 b, calculate the necessary flash power, aperture andshutter speed, 492 b and acquire the image 494 b with the fill flash.The relationship between the flash power, the aperture and the shutterspeed are well formulated and known to one familiar in the art ofphotography. Examples of such calculations can be found in U.S. Pat. No.6,151,073 to Steinberg et. al., which is hereby incorporated byreference.

Alternatively, in a different embodiment, 496 b, this algorithm may beused to simply determine the overall exposure based on the knowledge andthe exposure of the faces. The image will then be taken, 488 b, based onthe best exposure for the faces, as calculated in 496 b. Many camerashave a matrix type of exposure calculation where different regionsreceive different weights as to the contribution for the total exposure.In such cases, the camera can continue to implement the same exposurealgorithm with the exception that now, regions with faces in them willreceive a larger weight in their importance towards such calculations.

FIG. 5 describes yet another valuable use of the knowledge of faces inimages. In this example, knowledge of the faces can help improve thequality of image presentation. An image, 510 is inserted into slide showsoftware. The face is then detected as defined in FIG. 1 block 104,including the location of the important features of the face such as theeyes and the mouth.

The user can then choose between a few options such as: zoom into theface vs. zoom out of the face and the level of zoom for a tight close up520, a regular close up 520 or a medium close up as illustrated by thebounding box 540. The software will then automatically calculate thenecessary pan, tilt and zoom needed to smoothly and gradually switchbetween the beginning and the end state. In the case where more than oneface is found, the software can also create a pan and zoom combinationthat will begin at one face and end at the other. In a more genericmanner, the application can offer from within a selection of effectssuch as dissolve,

FIG. 6 illustrates similar functionality but inside the device. Acamera, whether still or video as illustrated by the viewfinder 610,when in auto track mode 600, can detect the faces in the image, and thenpropose a digital combination of zoom pan and tilt to move from the fullwide image 630 to a zoomed in image 640. Such indication may also showon the viewfinder prior to zooming, 632 as indication to the user, whichthe user can then decide in real time whether to activate the autozooming or not. This functionality can also be added to a tracking modewhere the camera continuously tracks the location of the face in theimage. In addition, the camera can also maintain the right exposure andfocus based on the face detection.

FIG. 7a illustrates the ability to auto focus the camera based on thelocation of the faces in the image. Block 710 is a simulation of theimage as seen in the camera viewfinder. When implementing a centerweight style auto focus, 718, one can see that the image will focus onthe grass, 17 feet away, as depicted by the cross 712. However, asdescribed in this invention, if the camera in the pre-acquisition mode,104 detects the face, 714, and focuses on the face, rather thanarbitrarily on the center, the camera will then indicate to the userwhere the focus is, 722 and the lens will be adjusted to the distance tothe face, which in this example, as seen in 728, is 11 ft. vs. theoriginal 17 ft.

This process can be extended by one skilled in the art to support notonly a single face, but multiple faces, by applying some weightedaverage. Such average will depend on the disparity between the faces, indistances, and sizes.

FIG. 7b presents the workflow of the process as illustrated via theviewfinder in FIG. 7-a. When the face-auto-focus mode is activated, 740,the camera continuously seeks for faces, 750. This operation inside thecamera is performed in real time and needs to be optimized as such. Ifno faces are detected 760, the camera will switch to an alternativefocusing mode, 762. If faces are detected, the camera will mark thesingle or multiple faces. Alternatively, the camera may display thelocation of the face 772, on the viewfinder or LCD. The user may thentake a picture, 790 where the faces are in focus.

Alternatively, the camera may shift automatically, via user request orthrough preference settings to a face-tracking mode 780. In this mode,the camera keeps track of the location of the face, and continuouslyadjusts the focus based on the location of the face.

In an alternative embodiment, the camera can search for the faces andmark them, similarly to the cross in FIG. 722. The photographer can thenlock the focus on the subject, for example by half pressing the shutter.Locking the focus on the subject differs form locking the focus, by thefact that if the subject then moves, the camera can still maintain thecorrect focus by modifying the focus on the selected object.

FIG. 8 describes the use of information about the location and size offaces to determine the relevant compression ratio of different segmentsof the image. An image 800 is segmented into tiles using horizontal grid830 and vertical grid 820. The tiles which include or partially includeface information are marked 850. Upon compression, regions of 850 may becompressed differently than the tiles of image 800 outside of thisregion. The degree of compression may be predetermined, pre-adjusted bythe user or determined as an interactive process. In the case ofmultiple detected faces in an image, the user may also assign differentquality values, or compression rates based on the importance of thefaces in the image. Such importance may be determined subjectively usingan interactive process, or objectively using parameters such as therelative size of the face, exposure or location of the face relative toother subjects in the image.

An alternative method of variable compression involves variableresolution of the image. Based on this, the method described withreference to FIG. 8 can also be utilized to create variable resolution,where facial regions which are preferably usually the important regionsof the image, and will be preferably maintained with higher overallresolution than other regions in the image. According to this method,referring to FIG. 8, the regions of the face as defined in block 850will be preferably maintained with higher resolution than regions in theimage 800 which are not part of 850.

An image can be locally compressed so that specific regions will have ahigher quality compression which equates to lower compression rate.Alternatively and/or correspondingly, specific regions of an image mayhave more or less information associated with them. The information canbe encoded in a frequency-based, or temporal-based method such as JPEGor Wavelet encoding. Alternatively, compression on the spatial domainmay also involve a change in the image resolution. Thus, localcompression may also be achieved by defining adjustable variableresolution of an image in specific areas. By doing so, selected ordetermined regions of importance may maintain low compression or highresolution compared with regions determined to have less importance ornon-selected regions in the image.

Face detection and face tracking technology, particularly for digitalimage processing applications according to preferred and alternativeembodiments set forth herein, are further advantageous in accordancewith various modifications of the systems and methods of the abovedescription as may be understood by those skilled in the art, as setforth in the references cited and incorporated by reference herein andas may be otherwise described below. For example, such technology may beused for identification of faces in video sequences, particularly whenthe detection is to be performed in real-time. Electronic componentcircuitry and/or software or firmware may be included in accordance withone embodiment for detecting flesh-tone regions in a video signal,identifying human faces within the regions and utilizing thisinformation to control exposure, gain settings, auto-focus and/or otherparameters for a video camera (see, e.g., U.S. Pat. Nos. 5,488,429 and5,638,136 to Kojima et al., each hereby incorporated by reference). Inanother embodiment, a luminance signal and/or a color difference signalmay be used to detect the flesh tone region in a video image and/or togenerate a detecting signal to indicate the presence of a flesh toneregion in the image. In a further embodiment, electronics and/orsoftware or firmware may detect a face in a video signal and substitutea “stored” facial image at the same location in the video signal, whichmay be useful, e.g., in the implementation of a low-bandwidth videophone(see, e.g., U.S. Pat. No. 5,870,138 to Smith et al., hereby incorporatedby reference).

In accordance with another embodiment, a human face may be locatedwithin an image which is suited to real-time tracking of a human face ina video sequence (see, e.g., U.S. Pat. Nos. 6,148,092 and 6,332,033 toQian, hereby incorporated by reference). An image may be providedincluding a plurality of pixels and wherein a transformation andfiltering of each pixel is performed to determine if a pixel has a colorassociated with human skin-tone. A statistical distribution of skintones in two distinct directions may be computed and the location of aface within the image may be calculated from these two distributions.

In another embodiment, electrical and/or software or firmware componentsmay be provided to track a human face in an image from a video sequencewhere there are multiple persons (see, e.g., U.S. Pat. No. 6,404,900also to Qian, hereby incorporated by reference). A projection histogramof the filtered image may be used for output of the location and/or sizeof tracked faces within the filtered image. A face-like region in animage may also be detected by applying information to an observertracking display of the auto-stereoscopic type (see, e.g., U.S. Pat. No.6,504,942 to Hong et al., incorporated by reference).

An apparatus according to another embodiment may be provided fordetection and recognition of specific features in an image using aneigenvector approach to face detection (see, e.g., U.S. Pat. No.5,710,833 to Moghaddam et al., incorporated by reference). Additionaleigenvectors may be used in addition to or alternatively to theprincipal eigenvector components, e.g., all eigenvectors may be used.The use of all eigenvectors may be intended to increase the accuracy ofthe apparatus to detect complex multi-featured objects.

Another approach may be based on object identification and recognitionwithin a video image using model graphs and/or bunch graphs that may beparticularly advantageous in recognizing a human face over a widevariety of pose angles (see, e.g., U.S. Pat. No. 6,301,370 to Steffenset al., incorporated by reference). A further approach may be based onobject identification, e.g., also using eigenvector techniques (see,e.g., U.S. Pat. No. 6,501,857 to Gotsman et al., incorporated byreference). This approach may use smooth weak vectors to producenear-zero matches, or alternatively, a system may employ strong vectorthresholds to detect matches. This technique may be advantageouslyapplied to face detection and recognition in complex backgrounds.

Another field of application for face detection and/or trackingtechniques, particularly for digital image processing in accordance withpreferred and alternative embodiments herein, is the extraction offacial features to allow the collection of biometric data and trackingof personnel, or the classification of customers based on age, sex andother categories which can be related to data determined from facialfeatures. Knowledge-based electronics and/or software or firmware may beused to provide automatic feature detection and age classification ofhuman faces in digital images (see, e.g., U.S. Pat. No. 5,781,650 toLobo & Kwon, hereby incorporated by reference). Face detection andfeature extraction may be based on templates (see U.S. Pat. No.5,835,616 also to Lobo & Kwon, incorporated by reference). A systemand/or method for biometrics-based facial feature extraction may beemployed using a combination of disparity mapping, edge detection andfiltering to determine co-ordinates for facial features in the region ofinterest (see, e.g., U.S. Pat. No. 6,526,161 to Yan, incorporated byreference). A method for the automatic detection and tracking ofpersonnel may utilize modules to track a users head or face (see, e.g.,U.S. Pat. No. 6,188,777, incorporated by reference). For example, adepth estimation module, a color segmentation module and/or a patternclassification module may be used. Data from each of these modules canbe combined to assist in the identification of a user and the system cantrack and respond to a user's head or face in real-time.

The preferred and alternative embodiments may be applied in the field ofdigital photography. For example, automatic determination of mainsubjects in photographic images may be performed (see, e.g., U.S. Pat.No. 6,282,317 to Luo et al., incorporated by reference). Regions ofarbitrary shape and size may be extracted from a digital image. Thesemay be grouped into larger segments corresponding to physically coherentobjects. A probabilistic reasoning engine may then estimate the regionwhich is most likely to be the main subject of the image.

Faces may be detected in complex visual scenes and/or in a neuralnetwork based face detection system, particularly for digital imageprocessing in accordance with preferred or alternative embodimentsherein (see, e.g., U.S. Pat. No. 6,128,397 to Baluja & Rowley; and“Neural Network-Based Face Detection,” IEEE Transactions on PatternAnalysis and Machine Intelligence, Vol. 20, No. 1, pages 23-28, January1998 by the same authors, each reference being hereby incorporated byreference. In addition, an image may be rotated prior to the applicationof the neural network analysis in order to optimize the success rate ofthe neural-network based detection (see, e.g., U.S. Pat. No. 6,128,397,incorporated by reference). This technique is particularly advantageouswhen faces are oriented vertically. Face detection in accordance withpreferred and alternative embodiments, and which are particularlyadvantageous when a complex background is involved, may use one or moreof skin color detection, spanning tree minimization and/or heuristicelimination of false positives (see, e.g., U.S. Pat. No. 6,263,113 toAbdel-Mottaleb et al., incorporated by reference).

A broad range of techniques may be employed in image manipulation and/orimage enhancement in accordance with preferred and alternativeembodiments, may involve automatic, semi-automatic and/or manualoperations, and are applicable to several fields of application. Some ofthe discussion that follows has been grouped into subcategories for easeof discussion, including (i) Contrast Normalization and ImageSharpening; (ii) Image Crop, Zoom and Rotate; (iii) Image ColorAdjustment and Tone Scaling; (iv) Exposure Adjustment and Digital FillFlash applied to a Digital Image; (v) Brightness Adjustment with ColorSpace Matching; and Auto-Gamma determination with Image Enhancement;(vi) Input/Output device characterizations to determine Automatic/BatchImage Enhancements; (vii) In-Camera Image Enhancement; and (viii) FaceBased Image Enhancement. Other alternative embodiments may employtechniques provided at U.S. application Ser. No. 10/608,784, filed Jun.26, 2003, which is hereby incorporated by reference.

Slide Show Based on One or More Image Features or Regions of Interest

Therefore in one embodiment, the creation of a slide show is based onthe automated detection of face regions. In other embodiments, otherimage features, regions of interest (ROI) and/or characteristics aredetected and employed in combination with detected face regions orindependently to automatically construct a sophisticated slide showwhich highlights key features within a single image and or multipleimages such as a sequence of images.

Examples of image features or regions, in addition to faces, are facialregions such as eyes, nose, mouth, teeth, cheeks, ears, eyebrows,forehead, hair, and parts or combinations thereof, as well as foregroundand background regions of an image. Another example of a region of animage is a region that includes one or more faces and surrounding areaof the image around the face or faces.

Separation of Foreground and Background Regions

Foreground and background regions may be advantageously separated in apreferred embodiment, which can include independent or separatedetection, processing, tracking, storing, outputting, printing, cutting,pasting, copying, enhancing, upsampling, downsampling, fill flashprocessing, transforming, or other digital processing such as theexemplary processes provided in Tables I and II below. Independenttransformations may be made to the foreground regions and the backgroundregions. Such transformations are illustrated in the tables below. TableI lists several exemplary parameters that can be addressed regionallywithin an image or that can be addressed differently or adjusteddifferent amounts at different regions within an image. With focus,selective out-of-focus regions can be created, while other regions arein focus. With saturation, selective reduction of color (gray scale) canbe created, or different regions within an image can have different grayscales selected for them. With pixilation, selective reduction of amountof pixels per region can be applied. Sharpening can also be addedregion-by-region. With zooming, an image can be cropped to smallerregions of interest. With panning and tilting, it is possible to movehorizontally and vertically, respectively, within an image. With dolly,foreshortening or a change of perspective are provided.

Table II illustrates initial and final states for different regions,e.g., foreground and background regions, within an image havingprocessing applied differently to each of them. As shown, the initialstates for each region are the same with regard to parameters such asfocus, exposure sharpening and zoom, while addressing the regionsdifferently during processing provides different final states for theregions. In one example, both the foreground and background regions areinitially out of focus, while processing brings the foreground regioninto focus and leaves the background region out of focus. In anotherexample, both regions are initially normal in focus, while processingtakes the background out of focus and leaves the foreground in focus. Infurther examples, the regions are initially both normally exposed orboth under exposed, and processing results in the foreground regionbeing normally exposed and the background region being under exposed orover exposed. In another example, both regions are initially normalsharpened, and processing results in over-sharpening of the foregroundregion and under-sharpening of the background region. In a furtherexample, a full initial image with foreground and background is changedto a zoomed image to include only the foreground region or to include acropped background region. In a further example, an initial image withnormal background and foreground regions is changed to a new image withthe foreground region zoomed in and the background region zoomed out.

Transformations can be reversed. For example, zoom-in or cropping may bereversed to begin with the cropped image and zoom out, or blurring thatis sharpened may be reversed into an initial state of sharpening andfinal stages of blur, and so on with regard to the examples provided, orany permutations and any combinations of such transformations can beconcatenated in various orders and forms (e.g., zoom and blur, blur andzoom)

TABLE I Parameter Effect Focus Create selective out-of-focus regionsSaturate Create selective reduction of color (gray scale) PixelateSelectively reduce amount of pixels per region Sharpen Add sharpening toregions Zoom in Crop image to smaller region of interest Pan Movehorizontally across the image Tilt Move vertically up/down Dolly Changeperspective, foreshorteningExamples include:

TABLE II Initial State Final State Foreground Background ForegroundBackground Out of Focus Out of Focus In Focus Out of Focus Normal NormalNormal Out of Focus In Focus In Focus In Focus Normal Normal NormalUnder Exposed Good Exposure Good Exposure Good Exposure Under ExposedUnder Exposed Normal Under Exposed Good Exposure Normal Normal GoodExposure Over Exposed Good Exposure Good Exposure Normal Normal Oversharpened Under sharpened Sharpening Sharpening Full Image Full Imagewith Zoomed image to Cropped with Background include only FG BackgroundForeground Normal Normal Zoomed in Zoomed out (foreshortening)Alternatively, separated foreground/background regions may be furtheranalyzed to determine their importance/relevance. In another embodiment,a significant background feature such as a sunset or a mountain may beincorporated as part of a slide show sequence. Foreground and backgroundregions may be automatically separated, or semi-automatically, asdescribed at U.S. patent application Ser. No. 11/217,788, Filed Aug. 30,2005, which is hereby incorporated by reference.

After separation of foreground and background regions it is alsopossible to calculate a depth map of the background regions. Bycalculating such a depth map at the time that an image is acquired, itis possible to use additional depth map information to enhance theautomatic generation of a slide show.

In the embodiment which preferably uses faces, yet is applicable tousing other selected image features or regions, in case there aremultiple faces detected, interesting “camera movement” can be simulatedwhich includes panning/tilting from one face to another or zoomingin-out onto a selection of faces.

While an exemplary drawings and specific embodiments of the presentinvention have been described and illustrated, it is to be understoodthat that the scope of the present invention is not to be limited to theparticular embodiments discussed. Thus, the embodiments shall beregarded as illustrative rather than restrictive, and it should beunderstood that variations may be made in those embodiments by workersskilled in the arts without departing from the scope of the presentinvention as set forth in the claims that follow and their structuraland functional equivalents.

In addition, in methods that may be performed according to the claimsbelow and/or preferred embodiments herein, the operations have beendescribed in selected typographical sequences. However, the sequenceshave been selected and so ordered for typographical convenience and arenot intended to imply any particular order for performing theoperations, unless a particular ordering is expressly provided orunderstood by those skilled in the art as being necessary.

What is claimed is:
 1. A method of generating one or more new digitalimages using an original digitally-acquired image including a selectedimage feature, comprising: (a) identifying within a digital imageacquisition device one or more groups of pixels that correspond to aselected image feature within an original digitally-acquired image basedon information from one or more preview images; (b) selecting a portionof the original image that includes the one or more groups of pixels;and (c) automatically generating values of pixels of one or more newimages based on the selected portion in a manner which includes theselected image feature within the one or more new images.
 2. The methodof claim 1, wherein said transformation is different between theselected portion and remaining portions of the image.
 3. The method ofclaim 1, wherein said selected image feature comprises one or morefaces.
 4. The method of claim 1, wherein said selected image featurecomprises a human subject.
 5. The method of claim 1, wherein theselected image feature comprises a foreground region or a backgroundregion.
 6. The method of claim 5, wherein the foreground region isdetermined by detection of a face.
 7. The method of claim 5, wherein theforeground region is determined by defining said selected image featurewithin an original image to be local sharpness, relative exposure, localcolor clustering, or local saturation, or combinations thereof.
 8. Themethod of claim 5, wherein the determining of the foreground region bydefining said selected image feature within an original image comprisesdetermining a depth of focus.
 9. The method of claim 5, furthercomprising visually separating the foreground region and the backgroundregion within the one or more new images.
 10. The method of claim 9,further comprising calculating a depth map of the background region. 11.The method of claim 5, further comprising independently processing theforeground region or the background region, or both.
 12. A method asrecited in claim 1, wherein said identifying one or more groups ofpixels within a digital acquisition device is performed using nonimagedata.
 13. A method as recited in claim 12, wherein said non-image datacomprises one or more acquisition parameters.
 14. A method as recited inclaim 1, wherein said generating values of pixels of one or more newimages is performed within a digital acquisition device.
 15. A method asrecited in claim 1, wherein said generating values of pixels of one ormore new images is performed by an external device to said digitalacquisition device.
 16. A method of generating one or more new digitalimages using an original digitally-acquired image including a backgroundregion or a foreground region, or both, comprising: (a) identifyingwithin a digital image acquisition device one or more groups of pixelsthat correspond to a background region or a foreground region, or both,within an original digitally-acquired image based on information fromone or more preview images; (b) selecting a portion of the originalimage that includes the one or more groups of pixels; and (c)automatically generating values of pixels of one or more new imagesbased on the selected portion in a manner which includes the backgroundregion or the foreground region, or both, within each of the one or morenew images.
 17. The method of claim 16, further comprising separatingthe foreground region and the background region within the originalimage or the one or more new images or combinations thereof.
 18. Themethod of claim 17, further comprising calculating a depth map of thebackground region or the foreground region or both.
 19. The method ofclaim 16, further comprising independently processing the foregroundregion or the background region, or both.
 20. The method of claim 19,wherein at least one of said new images comprises an independentlyprocessed background region or foreground region or both.